package com.jlect.swebing.ui.client.laf;

import com.jlect.swebing.ui.client.Dimension;
import com.jlect.swebing.ui.client.EligibilityListener;
import com.jlect.swebing.ui.client.GComponent;

/**
 * This class defines interface for UI logic for the component
 *
 * @author Sergey Kozmin
 * @since 04.12.2007 9:25:20
 */
public interface ComponentUI {
    /**
     * Returns instance of the same component
     * This method is created to reduce number of classes that are needed to create component ui.
     * @return same (shared) instance if it is stateless or creates new if its statefull
     */
    public ComponentUI createInstance();

    /**
     * Install all required listeners to the target component
     * @param c target component
     */
    public void installUI(GComponent c);
    /**
     * Uninstall all listeners from the target component
     * @param c target component
     */
    public void uninstallUI(GComponent c);

    public Dimension getPreferredSize();
    public Dimension getMaximumSize();
    public Dimension getMinimumSize();
    
    /*public int getWidth();
    public int getHeight();
    public int getX();
    public int getY();

    public void setLocation(int x, int y);
    public void setSize(int width, int height);
    public void setBounds(int x, int y, int width, int height);

    public void setEnabled(boolean enabled);*/

//    public boolean isEligibile();
    public void setEligibilityListener(EligibilityListener listener);
//    public void setMouseListener(EligibilityListener listener);
}
